
<template>
  <div>
    <div class="tablebox">
      <div style="float: right">
        <el-form ref="form" :model="form" label-width="120px">
          <el-form-item label="账号">
            <el-input v-model="form.u_id" placeholder="请输入管理员账号" />
          </el-form-item>
        </el-form>
      </div>
      <div class="tableTitle">用户情况</div>
      <el-table
        :data="userInfo"
        style="width: 100%"
        border
        :default-sort="{ prop: 'node_number', order: 'descending' }"
      >
        <el-table-column
          prop="u_id"
          label="账号"
          width="180"
          align="center"
          header-align="center"
          show-overflow-tooltip
        />
        <el-table-column
          prop="u_name"
          label="姓名"
          width="80"
          align="center"
          header-align="center"
          show-overflow-tooltip
        />
        <el-table-column
          prop="u_sex"
          label="性别"
          width="80"
          align="center"
          header-align="center"
          show-overflow-tooltip
        />
        <el-table-column
          prop="u_age"
          label="年龄"
          width="80"
          align="center"
          header-align="center"
        />
        <el-table-column
          prop="u_address"
          label="居住地址"
          align="center"
          header-align="center"
        />
        <el-table-column
          prop="u_unit"
          label="工作单位"
          width="180"
          align="center"
          header-align="center"
        />
        <el-table-column
          prop="u_email"
          label="邮箱"
          width="120"
          align="center"
          header-align="center"
        />
        <el-table-column
          prop="u_number"
          label="手机号码"
          width="120"
          align="center"
          header-align="center"
        />
        <el-table-column
          prop="node_number"
          label="节点编号"
          width="100"
          align="center"
          header-align="center"
        />
        <el-table-column
          prop="current_carbon_potential"
          label="当前碳势"
          width="80"
          align="center"
          header-align="center"
        />
      </el-table>
      <div class="paginationBox">
        <el-pagination background layout="prev, pager, next" :total="1000" />
      </div>
    </div>
  </div>
</template>
<script>
import { getUserInfo } from "@/api/userinfo";
export default {
  data() {
    return {
      userInfo: [],
      form: {
        u_id: "",
      },
    };
  },
  methods: {},
  mounted() {
    getUserInfo().then((res) => {
      this.userInfo = res.data;
    });
  },
};
</script>
<style scoped>
</style>
